﻿using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using AspNetCs.Common;
using AspNetCs.Bll;
using AspNetCs.Model;
using AspNetCs.Enumerations;
using AspNetCs.Enumerations.memorial_enum;
using AspNetCs.Enumerations.User_Enum;
using AspNetCs.Enumerations.Channel_Enum;
using System;


public partial class Master_Admin_ModifyAdmin : Admin_BasePage
{

    protected void Page_Load(object sender, EventArgs e)
    {
        IsExit();
        lblUserName.Text = AdminInfo.UserName;
        if (!IsPostBack)
        {

        }
        else
        {

        }
    }

    protected void btnAdd_Click(object sender, EventArgs e)
    {
        int count = 1;
        if(!string.IsNullOrEmpty(txtPwd.Text))
        {
            string cmdText="update Admin set Password='{0}' where userName='{1}'";
            cmdText=string.Format(cmdText, EncryptString.GetEncrypt(this.txtPwd.Text.Trim()),this.AdminInfo.UserName.Trim());
            count=ExcuteSqlTextBLL.ExcuteResult(cmdText);
        }
        if(count>0)
        {
            ResultStr("Admin_ModifyAdmin.aspx","密码修改成功!");
        }
    }
    
}
